.TH "LIGHTNING-PING" "7" "" "" "lightning-ping"
.SH NAME
lightning-ping - Command to check if a node is up\.
.SH SYNOPSIS

\fBping\fR \fIid\fR [len] [pongbytes]

.SH DESCRIPTION

The \fBping\fR command checks if the node with \fIid\fR is ready to talk\. It accepts the following parameters:

.RS
.IP \[bu]
\fIid\fR: A string that represents the node id;
.IP \[bu]
\fIlen\fR: A integer that represents the length of the ping (default 128);
.IP \[bu]
\fIpongbytes\fR: An integer that represents the length of the reply (default 128)\.

.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
  "id": 82,
  "method": "ping",
  "params": {
    "len": 128,
    "pongbytes": 128
  }
}
.RE

.fi
.SH RETURN VALUE

On success, the command will return an object with a single string\.

.RS
.IP \[bu]
\fItotlen\fR: A string that represents the answer length of the reply message (including header)

.RE

On failure, one of the following error codes may be returned:

.RS
.IP \[bu]
-32602: Error in given parameters or unknown peer\.

.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
   "totlen": 132
}
.RE

.fi
.SH AUTHOR

Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.

.SH SEE ALSO

\fBlightning-connect\fR(7)

.SH RESOURCES

Main web site: \fIhttps://github.com/ElementsProject/lightning\fR

\" SHA256STAMP:eac5506bc761a2a9570a92c7e533b4c6ba72c56c4d69dce773887a9f88ea7ac2
